/*
    This file is part of Slydini.

    Slydini is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Slydini is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Slydini.  If not, see <http://www.gnu.org/licenses/>.
*/
#include "left_menu.h"
#include <QtGui>
#include "../painting/SWidget.h"

#include "moc_leftmenu.h"

LeftMenu::LeftMenu(QWidget *parent):Left_form(){
	setupUi(this);
	connect(toolButton1, SIGNAL(clicked()), this, SLOT(tool1()));
	connect(toolButton2, SIGNAL(clicked()), this, SLOT(tool2()));
	connect(toolButton3, SIGNAL(clicked()), this, SLOT(tool3()));
	connect(toolButton4, SIGNAL(clicked()), this, SLOT(tool4()));
	connect(toolButton5, SIGNAL(clicked()), this, SLOT(tool5()));
	connect(toolButton6, SIGNAL(clicked()), this, SLOT(tool6()));
	connect(toolButton7, SIGNAL(clicked()), this, SLOT(tool7()));
	connect(toolButton8, SIGNAL(clicked()), this, SLOT(tool8()));
	connect(toolButton9, SIGNAL(clicked()), this, SLOT(tool9()));
	connect(toolButton10, SIGNAL(clicked()), this, SLOT(tool10()));
	connect(toolButtonZI, SIGNAL(clicked()), this, SLOT(toolZI()));
	connect(toolButtonZO, SIGNAL(clicked()), this, SLOT(toolZO()));
}

LeftMenu::~LeftMenu(){                    
}


void LeftMenu::tool1(){
    SWidget::penStyle = SWidget::simple;
}
void LeftMenu::tool2(){
    SWidget::penStyle = SWidget::circles;
}
void LeftMenu::tool3(){
    SWidget::penStyle = SWidget::spray;
}
void LeftMenu::tool4(){
    SWidget::penStyle = SWidget::ribbon1;
}
void LeftMenu::tool5(){
    SWidget::penStyle = SWidget::ribbon2;
}
void LeftMenu::tool6(){
    SWidget::penStyle = SWidget::symetric;
}
void LeftMenu::tool7(){
    SWidget::penStyle = SWidget::images;
    SWidget::imageNo = 1;
}
void LeftMenu::tool8(){
    SWidget::penStyle = SWidget::images;
    SWidget::imageNo = 2;
}
void LeftMenu::tool9(){
    SWidget::penStyle = SWidget::images;
    SWidget::imageNo = 3;
}
void LeftMenu::tool10(){}

void LeftMenu::toolZI(){
     if(SWidget::penSize < 40)
          SWidget::penSize=SWidget::penSize+4;
     }

void LeftMenu::toolZO(){
     if(SWidget::penSize > 4)
          SWidget::penSize=SWidget::penSize-4;
     }
